package com.zhou.controller;


import com.zhou.service.UserInfoService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description : 用户信息
 * @Author : zyy
 * @Date: 2024/7/19  11:35
 */
@RestController
@RequestMapping("userInfo")
public class UserInfoController {
    @Resource
    private UserInfoService userInfoService;

    @PostMapping("login")
    @Operation(summary = "用户登录")
    public String login(String phone, String password) {
        try {
            return userInfoService.login(phone, password);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

}
